<template>
  <div>
      <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
          :editFormFileds="editFormFields" :editFormOptions="editFormOptions" :searchFormFields="searchFormFields"
          :searchFormFileds="searchFormFields" :searchFormOptions="searchFormOptions" :table="table"
          :extend="extend" :ck="false">
      </view-grid>
  </div>
</template>

<script>
import extend from "@/extension/highDaily/creativeDaily.js";
import ViewGrid from "@/components/basic/ViewGrid.vue";
var vueParam = {
  components: {
      ViewGrid
  },
  data() {
      return {
          table: {
              key: 'Id',
              footer: "Foots",
              cnName: '文创报表',
              name: 'creativeDaily',
              sortName: "Id",
              url: '/Small_statistic_sale_order/'
          },
          extend: extend,
          editFormFields: {},
          editFormOptions: [],
          searchFormFields: { product_name: "", ticket_name: "", channel_type: "", startTime: "", endTime: "" },
          searchFormOptions: [[
              { "title": "产品分类", "field": "product_ticket_type_name", "type": "like" }, 
              // { "title": "票种名称", "field": "ticket_name", "type": "like" },
              { "title": "销售渠道", "field": "channel_type", "type": "select", "dataKey": '',data: [] },
              { "title": "创建时间", "field": "createDate", "type": "date" }],
          ],
          columns: [
              {field:'id',title:'主键',type:'string',width:220,hidden:true,readonly:true,require:true,align:'left'},
              { field: 'productName', title: '产品名称', type: 'string', width: 220, align: 'left' },
              // { field: 'ticket_name', title: '票种名称', type: 'string', width: 120, align: 'left' },
              { field: 'productId', title: '产品Id', type: 'string', width: 120, align: 'left' },
              // { field: 'sales_price', title: '销售单价', type: 'string', width: 120, align: 'left' },
              { field: 'productType', title: '产品分类', type: 'string', width: 120, align: 'left' },
              { field: 'distriChannel', title: '销售渠道', type: 'string', width: 120, align: 'left' },
              { field: 'sellPrice', title: '销售单价', type: 'string', width: 120, align: 'left' },
              { field: 'salesNum', title: '销售数量', type: 'string', width: 120, align: 'left' },
              { field: 'sellAmount', title: '销售金额', type: 'string', width: 120, align: 'left' },
              { field: 'deliverNum', title: '发货数量', type: 'string', width: 120, align: 'left' },
              { field: 'deliverAmount', title: '发货金额', type: 'string', width: 120, align: 'left' },
              { field: 'refundNum', title: '退款数量', type: 'datetime', width: 120, align: 'left', sortable: true },
              { field: 'refundAmount', title: '退款金额', type: 'decimal', width: 120, align: 'left' },
          ],
          detail: {
              cnName: "#detailCnName",
              columns: [],
              sortName: "",
              key: ""
          },
          exportData: []
      };
  }
};
export default vueParam;
</script>
